<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .box {
        width: 300px;
        height: 50px;
    }

    .box1 {
        
        width: 300px;
        height: 50px;
        border-radius: 50px;
        transition-duration: 2.5s;
        z-index: auto;
        position: absolute;
        background-image: linear-gradient(to right, rgb(240, 137, 235) , rgb(248, 0, 236));
        
    }

    .box:hover .box1 {
        width: 50px;
        height: 50px;
        transition-duration: 2.5s;
        transform: scale(100px)
    }

    .box2 {
        z-index: -1;
        position: relative;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background:linear-gradient(to right ,#8f218f,#e00232);
        transition-duration: 2.5s;
    }

    .box:hover .box2 {
        transition-duration: 2.5s;
        transform: translate(60px) rotate(120deg);
    }

    .box3 {
        z-index: -1;
        position: relative;
        top: -50px;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background:linear-gradient(to right ,#194e77,#05e4a1);
        transition-duration: 2.5s;
    }

    .box:hover .box3 {
        transition-duration: 2.5s;
        transform: translate(120px) rotate(360deg)
    }
    .box4{
        z-index: -1;
        position: relative;
        top: -100px;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background:linear-gradient(to right ,#da7e28,#dbb405);
        transition-duration: 2.5s;
    }
    .box:hover .box4{
        transition-duration: 2.5s;
        transform: translate(180px) rotate(360deg)
    }
    .box5{
        z-index: -1;
        position: relative;
        top: -150px;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background:linear-gradient(to right ,#94e281,#56e603);
        transition-duration: 2.5s;
    }
    .box:hover .box5{
        transition-duration: 2.5s;
        transform: translate(240px) rotate(360deg)
    }
    .box6{
        z-index: -1;
        position: relative;
        top: -200px;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background:linear-gradient(to right ,#4a3ac9,#ccdd7a);
        transition-duration: 2.5s;
    }
    .box:hover .box6{
        transition-duration: 2.5s;
        transform: translate(297px) rotate(360deg)
    }
</style>

<body>
    <div class="box">
        <div class="box1">
            <div class="box2"></div>
            <div class="box3"></div>
            <div class="box4"></div>
            <div class="box5"></div>
            <div class="box6"></div>
        </div>
    </div>
</body>

</html>